<template>
  <el-aside>
    <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
    >
      <el-menu-item index="0" @click="$router.push('/')">首页</el-menu-item>
      <el-sub-menu index="1">
        <template #title>
          <el-icon>
            <Bowl/>
          </el-icon>
          <span>餐厅</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1" @click="$router.push('/restaurants')">餐厅列表</el-menu-item>
        </el-menu-item-group>
      </el-sub-menu>
      <el-sub-menu index="2">
        <template #title>
          <el-icon>
            <Ticket/>
          </el-icon>
          <span>用户</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="2-1" @click="$router.push('/user')">用户信息</el-menu-item>
        </el-menu-item-group>
      </el-sub-menu>
    </el-menu>
  </el-aside>
</template>

<script lang="ts" setup>
import {
  Bowl,
  Ticket,
} from '@element-plus/icons-vue'

</script>